package org.donghuan.rms.framework.domain;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.Date;

public class RecordPage implements PropertyChangeListener {

	private Long id;
	private String recordPageName;
	private String category;
	private String departMent;
	private String descripContext;
	private Person implementobject;
	private Object[] operators;
	private Date[] timePeriods;
	private RecordFile recordFile;// parent
	private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
			this);

	public RecordPage() {
	}

	public RecordPage(String recordPageName) {
		this.recordPageName = recordPageName;
	}

	public Long getId() {
		return id;
	}

	public String getRecordPageName() {
		return recordPageName;
	}

	public String getCategory() {
		return category;
	}

	public String getDepartMent() {
		return departMent;
	}

	public String getDescripContext() {
		return descripContext;
	}

	public Person getImplementobject() {
		return implementobject;
	}

	public Object[] getOperators() {
		return operators;
	}

	public Date[] getTimePeriods() {
		return timePeriods;
	}

	public RecordFile getRecordFile() {
		return recordFile;
	}

	public PropertyChangeSupport getPropertyChangeSupport() {
		return propertyChangeSupport;
	}

	public void setId(Long id) {
		propertyChangeSupport.firePropertyChange("id", this.id, this.id = id);
	}

	public void setRecordPageName(String recordPageName) {
		propertyChangeSupport.firePropertyChange("recordPageName",
				this.recordPageName, this.recordPageName = recordPageName);
	}

	public void setCategory(String category) {
		propertyChangeSupport.firePropertyChange("category", this.category,
				this.category = category);
	}

	public void setDepartMent(String departMent) {
		propertyChangeSupport.firePropertyChange("category", this.category,
				this.departMent = departMent);
	}

	public void setDescripContext(String descripContext) {
		propertyChangeSupport.firePropertyChange("descripContext",
				this.descripContext, this.descripContext = descripContext);
	}

	public void setImplementobject(Person implementobject) {
		propertyChangeSupport.firePropertyChange("implementobject",
				this.implementobject, this.implementobject = implementobject);
	}

	public void setOperators(Object[] operators) {
		propertyChangeSupport.firePropertyChange("operators", this.operators,
				this.operators = operators);
	}

	public void setTimePeriods(Date[] timePeriods) {
		propertyChangeSupport.firePropertyChange("timePeriods",
				this.timePeriods, this.timePeriods = timePeriods);
	}

	public void setRecordFile(RecordFile recordFile) {
		propertyChangeSupport.firePropertyChange("recordFile", this.recordFile,
				this.recordFile = recordFile);
	}

	public void setPropertyChangeSupport(
			PropertyChangeSupport propertyChangeSupport) {
		this.propertyChangeSupport = propertyChangeSupport;
	}

	public void addPropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
	}

	public void removePropertyChangeListener(PropertyChangeListener listener) {
		propertyChangeSupport.removePropertyChangeListener(listener);
	}

	@Override
	public void propertyChange(PropertyChangeEvent evt) {

	}

}
